package com.yantong.service;

import com.yantong.result.ResultVo;
import com.yantong.utils.PageUtils;
import com.yantong.pojo.Member;
import com.yantong.pojo.MemberWallet;
import com.yantong.pojo.MemberWalletLog;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author liaozhaogui
 * @description: MemberWalletService
 * @date 2020/9/22 17:19
 */
public interface MemberWalletService {
	/**
	 * 查询钱包信息
	 *
	 * @param member 用户参数
	 * @return com.jz.user.domain.MemberWallet
	 * @author liaozhaogui
	 * @date 2020/9/22 17:28
	 */
	MemberWallet findById(Member member);

	/**
	 * 查询所有的用户钱包
	 *
	 * @return java.util.List<com.jz.user.domain.MemberWallet>
	 * @author liaozhaogui
	 * @date 2020/9/23 10:13
	 */
	List<MemberWallet> queryAll();

	/**
	 * 新增
	 *
	 * @param memberWallet 参数信息
	 * @return int
	 * @author liaozhaogui
	 * @date 2020/9/22 17:42
	 */
	Long insert(MemberWallet memberWallet);

	/**
	 * 修改
	 *
	 * @param memberWallet 参数信息
	 * @return int
	 * @author liaozhaogui
	 * @date 2020/9/22 17:43
	 */
	int update(MemberWallet memberWallet);

	/**
	 * 钱包转赠
	 *
	 * @param memberId 用户id
	 * @param EADD     钱包地址
	 * @param money    转赠的金额
	 * @return int
	 * @author liaozhaogui
	 * @date 2020/9/26 20:59
	 */
	void updateBanBPay(Long memberId, String EADD, BigDecimal money);

	/**
	 * 新增资产释放历史
	 *
	 * @param memberWalletLog 参数信息
	 * @return java.lang.Long
	 * @author liaozhaogui
	 * @date 2020/9/24 10:30
	 */
	Long insertLog(MemberWalletLog memberWalletLog);

	/**
	 * 查询资产释放历史
	 *
	 * @param mid  用户id
	 * @param type 资产类型
	 * @return com.jz.user.domain.MemberWalletLog
	 * @author liaozhaogui
	 * @date 2020/9/24 10:28
	 */
	PageUtils<MemberWalletLog> findLog(Long mid, Integer type, int offset, int limit);

	ResultVo redenvelopeTurnout(BigDecimal money, Long mid);
}
